<%@ page contentType="text/html;charset=UTF-8" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main" />
    <g:set var="entityName" value="${message(code: 'socio.label', default: 'Socio')}" />
    <title>Pesquisa</title>
  </head>
  <body>
    <div class="nav">
        <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a>
        <g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
    </div>
    <div class="body">
      <h1><g:message code="socio.pesquisa.label" /></h1>
      <g:if test="${flash.message}">
          <div class="message">${flash.message}</div>
      </g:if>
      <g:form method="post" >
        <div class="buttons">
          <input type="text" id="campo" name="campo" size="60"/>
          <span class="button"><g:actionSubmit class="pesquisa" action="encontrar" value="." /></span>
        </div>
      </g:form>
      <br/><br/>
      <div class="list">
        <table>
          <thead>
            <th>Resultado da pesquisa</th>
          </thead>
          <tbody>
            <g:each in="${socioInstanceList}" status="i" var="socioInstance">
              <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                <td>
                  <g:link action="show" id="${socioInstance.id}">${fieldValue(bean: socioInstance, field: "nome")}</g:link><br/>
                  ${fieldValue(bean: socioInstance, field: "nomeDeGuerra")}<br/>
                  ${fieldValue(bean: socioInstance, field: "endereco")}<br/>
                  ${fieldValue(bean: socioInstance, field: "email")}
                </td>
              </tr>
            </g:each>
          </tbody>
        </table>
      </div>
      <div class="paginateButtons">
          <g:paginate total="${socioInstanceTotal}" />
      </div>
    </div>
  </body>
</html>
